]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dialog: Rename subtitle property to description
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 13 Jan 2020 13:07:28 +0000 (14:07 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 14 Jan 2020 23:12:54 +0000 (00:12 +0100)
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886

data/theme/gnome-shell-sass/widgets/_dialogs.scss
js/ui/accessDialog.js
js/ui/closeDialog.js
js/ui/dialog.js
js/ui/inhibitShortcutsDialog.js
js/ui/status/location.js

index dc846369fd17a829be70ffff3bd0f7c1613b33be..2697e07b1d02fd7f8f85b25704516bad76c9c6d7 100644 (file)
@@ -43,7 +43,7 @@
   font-weight: bold;
 }
 
-.message-dialog-subtitle {
+.message-dialog-description {
   color: $fg_color;
   font-weight: bold;
 }
index 4f9f4720213a85d739dd3c2897cefde1c550ee79..e0fc8a179c0e379973fadd66449f2af0d18bf9c2 100644 (file)
@@ -18,7 +18,7 @@ var DialogResponse = {
 
 var AccessDialog = GObject.registerClass(
 class AccessDialog extends ModalDialog.ModalDialog {
-    _init(invocation, handle, title, subtitle, body, options) {
+    _init(invocation, handle, title, description, body, options) {
         super._init({ styleClass: 'access-dialog' });
 
         this._invocation = invocation;
@@ -30,17 +30,17 @@ class AccessDialog extends ModalDialog.ModalDialog {
         for (let option in options)
             options[option] = options[option].deep_unpack();
 
-        this._buildLayout(title, subtitle, body, options);
+        this._buildLayout(title, description, body, options);
     }
 
-    _buildLayout(title, subtitle, body, options) {
+    _buildLayout(title, description, body, options) {
         // No support for non-modal system dialogs, so ignore the option
         // let modal = options['modal'] || true;
         let denyLabel = options['deny_label'] || _("Deny Access");
         let grantLabel = options['grant_label'] || _("Grant Access");
         let choices = options['choices'] || [];
 
-        let contentParams = { title, subtitle, body };
+        let contentParams = { title, description, body };
         let content = new Dialog.MessageDialogContent(contentParams);
         this.contentLayout.add_actor(content);
 
@@ -130,7 +130,7 @@ var AccessDialogDBus = class {
             return;
         }
 
-        let [handle, appId, parentWindow_, title, subtitle, body, options] = params;
+        let [handle, appId, parentWindow_, title, description, body, options] = params;
         // We probably want to use parentWindow and global.display.focus_window
         // for this check in the future
         if (appId && `${appId}.desktop` != this._windowTracker.focus_app.id) {
@@ -140,8 +140,8 @@ var AccessDialogDBus = class {
             return;
         }
 
-        let dialog = new AccessDialog(invocation, handle, title,
-                                      subtitle, body, options);
+        let dialog = new AccessDialog(
+            invocation, handle, title, description, body, options);
         dialog.open();
 
         dialog.connect('closed', () => (this._accessDialog = null));
index b48428d20f46201cb1446ac6b040de3796b1ce19..4ee6de6d2872334f98a1a5d0ead367ece3848c6e 100644 (file)
@@ -40,9 +40,9 @@ var CloseDialog = GObject.registerClass({
 
         /* Translators: %s is an application name */
         let title = _("“%s” is not responding.").format(windowApp.get_name());
-        let subtitle = _("You may choose to wait a short while for it to " +
-                         "continue or force the application to quit entirely.");
-        return new Dialog.MessageDialogContent({ title, subtitle });
+        let description = _('You may choose to wait a short while for it to ' +
+                            'continue or force the application to quit entirely.');
+        return new Dialog.MessageDialogContent({ title, description });
     }
 
     _updateScale() {
index cce00c84665ba579d96dad13572b9ce0dd49659f..f8fca56551f9960ebdc483da8502345dc242ac23 100644 (file)
@@ -151,8 +151,8 @@ var MessageDialogContent = GObject.registerClass({
             GObject.ParamFlags.READWRITE |
             GObject.ParamFlags.CONSTRUCT,
             null),
-        'subtitle': GObject.ParamSpec.string(
-            'subtitle', 'subtitle', 'subtitle',
+        'description': GObject.ParamSpec.string(
+            'description', 'description', 'description',
             GObject.ParamFlags.READWRITE |
             GObject.ParamFlags.CONSTRUCT,
             null),
@@ -165,10 +165,10 @@ var MessageDialogContent = GObject.registerClass({
 }, class MessageDialogContent extends St.BoxLayout {
     _init(params) {
         this._title = new St.Label();
-        this._subtitle = new St.Label();
+        this._description = new St.Label();
         this._body = new St.Label();
 
-        ['title', 'subtitle', 'body'].forEach(prop => {
+        ['title', 'description', 'body'].forEach(prop => {
             this[`_${prop}`].add_style_class_name(`message-dialog-${prop}`);
         });
 
@@ -176,7 +176,7 @@ var MessageDialogContent = GObject.registerClass({
             ellipsize: Pango.EllipsizeMode.NONE,
             line_wrap: true,
         };
-        this._subtitle.clutter_text.set(textProps);
+        this._description.clutter_text.set(textProps);
         this._body.clutter_text.set(textProps);
 
         let defaultParams = {
@@ -187,7 +187,7 @@ var MessageDialogContent = GObject.registerClass({
         super._init(Object.assign(defaultParams, params));
 
         this.add_child(this._title);
-        this.add_child(this._subtitle);
+        this.add_child(this._description);
         this.add_child(this._body);
     }
 
@@ -195,8 +195,8 @@ var MessageDialogContent = GObject.registerClass({
         return this._title.text;
     }
 
-    get subtitle() {
-        return this._subtitle.text;
+    get description() {
+        return this._description.text;
     }
 
     get body() {
@@ -207,8 +207,8 @@ var MessageDialogContent = GObject.registerClass({
         this._setLabel(this._title, 'title', title);
     }
 
-    set subtitle(subtitle) {
-        this._setLabel(this._subtitle, 'subtitle', subtitle);
+    set description(description) {
+        this._setLabel(this._description, 'description', description);
     }
 
     set body(body) {
index 42cfb0f90c9853b7f1ca404593cd435d38443fae..2ef2d04ed717099bdc74f5245166ec7649d179c5 100644 (file)
@@ -84,7 +84,7 @@ var InhibitShortcutsDialog = GObject.registerClass({
 
         let restoreAccel = this._getRestoreAccel();
         if (restoreAccel) {
-            contentParams.subtitle =
+            contentParams.description =
                 /* Translators: %s is a keyboard shortcut like "Super+x" */
                 _("You can restore shortcuts by pressing %s.").format(restoreAccel);
         }
index 3ed54fe0e47413b5f192d31423890dd316b66ef1..e9754bc5b07acd090092872d1e8e4d9f94ed2b2d 100644 (file)
@@ -347,7 +347,7 @@ var AppAuthorizer = class {
 var GeolocationDialog = GObject.registerClass({
     Signals: { 'response': { param_types: [GObject.TYPE_UINT] } },
 }, class GeolocationDialog extends ModalDialog.ModalDialog {
-    _init(name, subtitle, reqAccuracyLevel) {
+    _init(name, description, reqAccuracyLevel) {
         super._init({ styleClass: 'geolocation-dialog' });
         this.reqAccuracyLevel = reqAccuracyLevel;
 
@@ -355,7 +355,7 @@ var GeolocationDialog = GObject.registerClass({
         let title = _("Give %s access to your location?").format(name);
         let body = _("Location access can be changed at any time from the privacy settings.");
 
-        let contentParams = { title, subtitle, body };
+        let contentParams = { title, description, body };
         let content = new Dialog.MessageDialogContent(contentParams);
         this.contentLayout.add_actor(content);